<?php

namespace plugin\enterprise\app\controller;

use plugin\enterprise\app\Enterprise;
use plugin\owladmin\app\controller\AdminController;

class BaseAdminController extends AdminController
{
    public function __construct()
    {
        parent::__construct();

        if (property_exists($this, 'serviceName')) {
            $this->service = $this->serviceName::make();
        }

        $this->adminPrefix = Enterprise::config('enterprise.route.prefix');

        $this->queryPath = str_replace($this->adminPrefix . '/', '', request()->path());
    }
}